#include <iostream>

using namespace std;

const int N = 1e7 + 10;

int n, x;
int arr[N];

int main()
{
    cin >> n >> x;

    for (int i = 0; i < n; i++)
        cin >> arr[i];

    int res = 1e7 + 10;
    int res_l = -1, res_r = -1;

    int sum = 0, l = 0;
    for (int r = 0; r < n; r++)
    {
        sum += arr[r];

        while (l <= r && sum >= x)
        {

            if (sum >= x && res > (r - l + 1))
            {
                res = r - l + 1;
                res_l = l + 1, res_r = r + 1;
                //             cout << "res_l : " << res_l << "   " << "res_r : " << res_r << endl;
            }

            sum -= arr[l];
            l++;
        }
    }

    cout << res_l << " " << res_r << endl;
    return 0;
}